package Thinh.thinh.service;

import java.util.List;

import org.springframework.stereotype.Service;

import Thinh.thinh.dao.UserDao;
import Thinh.thinh.model.User;


public class UserServiceImpl implements UserService {
	
	private UserDao userDao;
	

	
	public User getUser(Long id) {
		
		return userDao.findById(id);
		
	}

	
	public List<User> getUsers() {
		
		return userDao.findAll();
		
	}
	
	
	public void createUser(User vVUser) {
		
		userDao.create(vVUser);
		
	}
	
	
	public void deleteUser(User vVUser) {
		
		userDao.delete(vVUser);
		
	}
	
	

	
	public void updateUser(User vVUser) {
		
		userDao.update(vVUser);
		
	}

	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}











}
